Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use storage records api in e2e #4373

Merged
merged 13 commits into from
Nov 21, 2023

Conversation

petrjasek
Copy link
Member

No description provided.

@petrjasek petrjasek changed the title Feat storage records use storage records api in e2e Nov 10, 2023
@petrjasek petrjasek modified the milestones: 2.7, 2.8 Nov 10, 2023
@tomaskikutis
Copy link
Member

Progress at last 🎉 . Are there instructions somewhere on how do I try it out?

@petrjasek
Copy link
Member Author

added a readme @tomaskikutis

@tomaskikutis
Copy link
Member

I see you removed the existing prepopulate thing entirely and probably created a full dump from it. The problem is that prepopulate script produced a corrupted DB in a sense that schema wasn't respected and you would find all kinds of states that are not possible in production. My idea was to continue using prepopulate for old tests, but make a new full dump for new tests. That still can be done in a way - I would rename existing full dump to legacy_dump and would only run old tests against it. And make a new clean one for new tests that we'd run with a new framework.

In summary, for this PR it'd be enough if you could rename current full dumps to legacy_dump or something similar and create a clean full dump using the same process as you'd use for production.

@tomaskikutis
Copy link
Member

by the way, I'm wondering now, is there a way to modify the full dump instead of creating a new record? I'm thinking that for 90% of the cases we'd want one big snapshot/dump to be able to speed up and parallelize test runs, and for the edge cases we'd use records where a specific state needs to be simulated that can't co-exists in the main dump.

@petrjasek
Copy link
Member Author

petrjasek commented Nov 15, 2023

not sure what data should be in this full dump, we don't have any initial dataset.

by the way, I'm wondering now, is there a way to modify the full dump instead of creating a new record? I'm thinking that for 90% of the cases we'd want one big snapshot/dump to be able to speed up and parallelize test runs, and for the edge cases we'd use records where a specific state needs to be simulated that can't co-exists in the main dump.

I think that's the usecase for records, it's just a diff from the full dump.

@tomaskikutis
Copy link
Member

not sure what data should be in this full dump, we don't have any initial dataset.

I'd initialize the DB, add mandatory metadata and then 1 desk, 1 stage, 1 article and that'd be good for a start. Later we could add things as we go along.

I think that's the usecase for records, it's just a diff from the full dump.

I know what records are useful for. What I was asking is whether we can also append stuff to the main dump and not create a record?

@petrjasek petrjasek closed this Nov 15, 2023
@petrjasek petrjasek reopened this Nov 15, 2023
@petrjasek
Copy link
Member Author

I think that's the usecase for records, it's just a diff from the full dump.

I know what records are useful for. What I was asking is whether we can also append stuff to the main dump and not create a record?

what's the usecase? it still sounds to me as a new record but I'm probably missing something

@tomaskikutis
Copy link
Member

what's the usecase? it still sounds to me as a new record but I'm probably missing something

Imagine we write 100 tests per year. Would it mean then that after that everytime before e2e runs, 100 records need to be applied to the base dump to generate the latest database state? If it's fast I don't mind, but I suspect it might be a bit inefficient.

@petrjasek petrjasek merged commit 8c46629 into superdesk:develop Nov 21, 2023
8 checks passed
@petrjasek petrjasek deleted the feat-storage-records branch November 21, 2023 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants